<?php

use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;
use common\models\car\CarNews;


$this->title = Yii::t('app', 'car History');
$this->params['breadcrumbs'][] = $this->title;
?>
<style>
    th{background:#CAE1FF}
</style>
<h1><?= Html::encode($title) ?></h1>
<p>
    <a href="<?php echo Url::to(['car-info-edit', 'id' => $data->id, 'title' => $title]); ?>" class="btn btn-primary">
        更新
    </a>
</p>
<br>
<table  class="table table-striped table-bordered">
    <tr>
        <th>标题</th>
    </tr>
    <tr>
        <td><?php echo $data->title; ?></td>
    </tr>
    <tr>
        <th>简介</th>
    </tr>
    <tr>
        <td><?php echo $data->simple; ?></td>
    </tr>
    <tr>
        <th>内容（包含HTML）</th>
    </tr>
    <tr>
        <td><?php echo $data->content_html; ?></td>
    </tr>
    <tr>
        <th>内容</th>
    </tr>
    <tr>
        <td><?php echo $data->content_txt; ?></td>
    </tr>
    <tr>
        <th>图片</th>
    </tr>
    <tr>
        <td><img src="<?php echo $data->image; ?>" width="150"></td>
    </tr>
    <tr>
        <th>是否开启</th>
    </tr>
    <tr>
        <td><?php echo CarNews::$isOpen[$data->is_open]; ?></td>
    </tr>
    <tr>
        <th>作者</th>
    </tr>
    <tr>
        <td><?php echo $data->name; ?></td>
    </tr>
    <tr>
        <th>转载源自</th>
    </tr>
    <tr>
        <td><?php echo $data->source; ?></td>
    </tr><tr>
        <th>跳转转载地址</th>
    </tr>
    <tr>
        <td><a href="<?php echo $data->href; ?>" class="btn btn-warning" target="view_window">查看源内容</a></td>
    </tr><tr>
        <th>创建时间</th>
    </tr>
    <tr>
        <td><?php echo date('Y-m-d H:i:s', $data->created_at); ?></td>
    </tr>
</table>

